test(engine): add regression test for alarm-during-sleep-transition race#4755
Conversation
PR Review: Regression Test for Alarm-During-Sleep-Transition RaceOverviewAdds a single regression test Issues1. The test never runs in CI. If the Suggestion: Either remove 2. Potential lifecycle event subscription race The test subscribes to lifecycle events after The existing Suggestion: Call 3. Delta documentation in comments The doc comment references the specific before/after state and file path: "Before the fix in CLAUDE.md discourages delta-documenting comments. If Suggestion: Describe the invariant being tested rather than the historical before/after. E.g.: "Verifies that an alarm that becomes overdue during the sleep-shutdown transition is not silently dropped: the engine must detect and handle it via reallocation." 4. No sleep-entry assertion The test verifies the actor wakes at generation 1 but never confirms it entered sleep first. If a regression caused the actor to stay awake and handle the alarm via the normal (non-overdue) path, the test would still pass at generation 1 without exercising the race-specific code path. Suggestion: Add a Positive Aspects
SummaryThe race scenario is valid and worth guarding. Main concerns: (1) |
50500b5 to
d151463
Compare
ed93ef7 to
8d93174
Compare
Preview packages published to npmInstall with: npm install rivetkit@pr-4755All packages published as Engine binary is shipped via Docker images: docker pull rivetdev/engine:slim-867c305
docker pull rivetdev/engine:full-867c305Individual packagesnpm install rivetkit@pr-4755
npm install @rivetkit/react@pr-4755
npm install @rivetkit/rivetkit-napi@pr-4755
npm install @rivetkit/workflow-engine@pr-4755 |

Description
Please include a summary of the changes and the related issue. Please also include relevant motivation and context.
Type of change
How Has This Been Tested?
Please describe the tests that you ran to verify your changes.
Checklist: